<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var str="rg352";
        console.log(str.match("2"));

        console.log(str.search("3"));

        console.log(str.indexOf("g"));

        console.log(str.includes("5"));

// 字符串模板
        var str2="我手机用了"+(23+1)+"年";
        console.log(str2);

        var str3=`我收了${245+21}年的礼物`;
        console.log(str3);
    </script>
</body>
</html>